/PROG  PNS0020
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "LYRA-P0244472";
PROG_SIZE	= 3947;
CREATE		= DATE 23-02-15  TIME 13:07:56;
MODIFIED	= DATE 25-04-08  TIME 13:38:46;
FILE_NAME	= PNS0002;
VERSION		= 0;
LINE_COUNT	= 144;
MEMORY_SIZE	= 4427;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R12 ;
   6:  !  PROGRAM: PNS0072 ;
   7:  !  PART:P0284490 ;
   8:  !ZYL2022.6.5********************* ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14:CG SENSETIVE]=90    ;
  13:  R[18:PICK TIME BEFORE]=1    ;
  14:  R[19:DROP TIME BEFORE]=.1    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[3] ;
  23:  //R[5:SPEED]=10    ;
  24:  R[32:CYCLE COUNT]=0    ;
  25:  !INITIATE TO PICK-POUNCE ;
  26:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  27:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  28:  R[1:CYCLE TOTAL]=0    ;
  29:  TIMER[1]=RESET ;
  30:  TIMER[1]=START ;
  31:  JMP LBL[5] ;
  32:   ;
  33:  LBL[5] ;
  34:  PR[6:PICK POSTION]=PR[9:PNS72 PS]    ;
  35:  R[32:CYCLE COUNT]=0    ;
  36:  JMP LBL[10] ;
  37:   ;
  38:  !***DO NOT RUN THIS LBL8*** ;
  39:  LBL[8] ;
  40:  PR[7:PNS70 PS]=PR[6:PICK POSTION]    ;
  41:   ;
  42:  LBL[10:TOP OF LOOF] ;
  43:   ;
  44:  TIMER[3]=STOP ;
  45:  TIMER[2]=STOP ;
  46:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  47:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  48:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  49:  R[8:R MOVE TIME]=TIMER[3]    ;
  50:  TIMER[2]=RESET ;
  51:  TIMER[2]=START ;
  52:  TIMER[3]=RESET ;
  53:   ;
  54:  !PROCEED TO PICK ;
  55:  LBL[20] ;
  56:   ;
  57:  IF DI[1:P1 PICK ENTRY OK]=ON AND DI[3:FROM RL1 CLEAR]=ON AND DI[38:RL SAFETY POS]=ON AND DI[8:P1 PICK START]=ON AND DI[40:PART IN PRS]=ON,JMP LBL[25] ;
  58:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  59:  JMP LBL[20] ;
  60:   ;
  61:  LBL[25:GOTO PICK] ;
  62:  TIMER[3]=START ;
  63:  R[32:CYCLE COUNT]=R[32:CYCLE COUNT]+1    ;
  64:  DO[38:R12 SAFETY POS]=OFF ;
  65:J P[3:PICK APPROACH] 100% CNT30 ACC100    ;
  66:L P[4] 1000mm/sec CNT0 DB   80.0mm,DO[41:SecondAirON]=PULSE,1.5sec    ;
  67:L P[4] 1000mm/sec CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  68:  PAYLOAD[4] ;
  69:  CALL CHK_PICK    ;
  70:  MONITOR Z_CHECH ;
  71:L P[5:UPPER] 800mm/sec CNT60 ACC100    ;
  72:   ;
  73:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  74:  DO[5:TO RL1 DROP START]=PULSE,1.0sec ;
  75:  DO[38:R12 SAFETY POS]=ON ;
  76:  DO[8:P1 PARTS OUT]=PULSE,1.0sec ;
  77:  LBL[30:GOTO DROP POUNCE] ;
  78:J P[8:DROP POUNCE] 95% CNT100 ACC90 BREAK    ;
  79:  TIMER[3]=STOP ;
  80:   ;
  81:  IF DI[39:Single BLANK]=ON,JMP LBL[40] ;
  82:  JMP LBL[27] ;
  83:  LBL[27:DROP D BLANK] ;
  84:J P[18] 50% CNT100 ACC100    ;
  85:  MONITOR END Z_CHECH ;
  86:J P[15:DROP DOUBLE] 20% CNT0 ACC100 TB R[19]sec,CALL PARTDROP BREAK    ;
  87:J P[16] 50% CNT100 ACC100 TA   0.00sec,DO[39:DBlankReset]=PULSE,1.0sec    ;
  88:  PR[6,3:PICK POSTION]=PR[6,3:PICK POSTION]-1.5    ;
  89:J P[2:PICK POUNCE] 100% CNT70 ACC100    ;
  90:  IF DI[40:PART IN PRS]=OFF,JMP LBL[86] ;
  91:  JMP LBL[20] ;
  92:   ;
  93:  LBL[40:AT DROP POUNCE] ;
  94:  IF DI[2:P2 DROP ENTRY]=ON AND DI[4:FROM R23 CLEAR]=ON AND DI[5:P2 DROP START]=ON,JMP LBL[80] ;
  95:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P2 DROP ENTRY]=ON,JMP LBL[50] ;
  96:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  97:  JMP LBL[40] ;
  98:   ;
  99:  LBL[50:MOVE DROP SNEAK] ;
 100:  TIMER[3]=START ;
 101:J P[9:DROP SNEAK] 100% CNT100 ACC100 BREAK    ;
 102:  LBL[51:DROP OR C-P-S] ;
 103:  IF DI[2:P2 DROP ENTRY]=ON AND DI[4:FROM R23 CLEAR]=ON AND DI[5:P2 DROP START]=ON,JMP LBL[80] ;
 104:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
 105:  JMP LBL[51] ;
 106:   ;
 107:  LBL[60:MOVE CLS-PRS-ACC] ;
 108:J P[1:MIDDLE] 50% CNT100 ACC100    ;
 109:  PAUSE ;
 110:  JMP LBL[30] ;
 111:   ;
 112:  LBL[80:DROP ENABLED] ;
 113:  TIMER[3]=START ;
 114:  !PROCEED TO DROP ;
 115:J P[10:DROP APPROACH] 100% CNT50 ACC100    ;
 116:  MONITOR END Z_CHECH ;
 117:J P[11:DROP] 100% CNT0 TB R[19]sec,CALL PARTDROP ACC100 BREAK    ;
 118:  DO[6:PART DROP COMPLETE]=PULSE,1.0sec ;
 119:  PAYLOAD[3] ;
 120:  CALL CHK_DROP    ;
 121:   ;
 122:J P[12:DROP DEPART] 100% CNT80 ACC130 TA   0.00sec,DO[7:PRESS STAMPING START]=PULSE,1.0sec    ;
 123:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 124:  !GOTO PICK POUNCE ;
 125:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 126:  IF DI[40:PART IN PRS]=OFF,JMP LBL[89] ;
 127:  JMP LBL[89] ;
 128:   ;
 129:  LBL[86:P1 ADC START] ;
 130:  DO[22:P1_ADC START]=PULSE,3.0sec ;
 131:  JMP LBL[89] ;
 132:  LBL[89] ;
 133:   ;
 134:   ;
 135:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 136:  JMP LBL[10] ;
 137:   ;
 138:  LBL[90:END OF CYCLE] ;
 139:  TIMER[1]=STOP ;
 140:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 141:J P[1:MIDDLE] 50% CNT100    ;
 142:  MOVE TO HOME    ;
 143:   ;
 144:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2086.455  mm,	Y =     -.007  mm,	Z = -1320.321  mm,
	W =  -180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2162.015  mm,	Y =  1575.890  mm,	Z =  -786.370  mm,
	W =   179.441 deg,	P =      .436 deg,	R =   142.049 deg,
	E1=   142.100 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2820.955  mm,	Y =  2682.474  mm,	Z =  -720.520  mm,
	W =   174.861 deg,	P =    -5.928 deg,	R =   102.850 deg,
	E1=   182.321 deg
};
P[4]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2820.955  mm,	Y =  2682.474  mm,	Z =  -876.519  mm,
	W =   174.861 deg,	P =    -5.928 deg,	R =   102.850 deg,
	E1=   182.321 deg
};
P[5:"UPPER"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2821.079  mm,	Y =  2682.348  mm,	Z =  -669.544  mm,
	W =   174.676 deg,	P =    -4.871 deg,	R =   102.853 deg,
	E1=   182.322 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2120.881  mm,	Y =  1854.313  mm,	Z =  -864.192  mm,
	W =   179.509 deg,	P =      .286 deg,	R =   136.610 deg,
	E1=   147.644 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2155.000  mm,	Y = -1173.340  mm,	Z =  -844.097  mm,
	W =  -179.530 deg,	P =      .624 deg,	R =  -154.211 deg,
	E1=    78.520 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2227.145  mm,	Y = -2221.415  mm,	Z =  -811.699  mm,
	W =  -178.946 deg,	P =      .055 deg,	R =  -132.337 deg,
	E1=    56.855 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2692.262  mm,	Y = -3283.463  mm,	Z =  -863.313  mm,
	W =  -179.802 deg,	P =    -2.793 deg,	R =   -88.395 deg,
	E1=    13.190 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2692.262  mm,	Y = -3283.463  mm,	Z =  -967.553  mm,
	W =  -179.802 deg,	P =    -2.793 deg,	R =   -88.395 deg,
	E1=    13.190 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2692.265  mm,	Y = -3283.463  mm,	Z =  -905.713  mm,
	W =  -179.802 deg,	P =    -2.793 deg,	R =   -88.395 deg,
	E1=    13.190 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2064.434  mm,	Y = -1287.327  mm,	Z =  -899.117  mm,
	W =  -179.493 deg,	P =      .586 deg,	R =  -151.481 deg,
	E1=    75.955 deg
};
P[15:"DROP DOUBLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  1632.651  mm,	Y =   -94.040  mm,	Z = -1899.113  mm,
	W =   179.764 deg,	P =     3.190 deg,	R =  -179.809 deg,
	E1=   194.943 deg
};
P[16]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  1884.268  mm,	Y =  1109.538  mm,	Z = -1088.794  mm,
	W =   179.631 deg,	P =      .439 deg,	R =   156.630 deg,
	E1=   167.003 deg
};
P[18]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  1861.632  mm,	Y =    33.521  mm,	Z = -1430.825  mm,
	W =   179.915 deg,	P =      .626 deg,	R =  -178.808 deg,
	E1=   172.239 deg
};
/END
